<template>
  <el-card
    style="padding: 0"
    @click="goto_detail_notice"
    class="box-card">
    <img style="width:100% ; height: 300px" :src="img_src" alt="failed"/>
  </el-card>
</template>

<script>
export default {
  name: 'NoticeCard',
  data () {
    return {
      // img_src:require('@/assets/test1.jpg'),
    }
  },
  props:["img_src",'DetailNoticeData'],
  methods:
    {
      goto_detail_notice(){
        if (localStorage.getItem('Token')) {
          sessionStorage.setItem("DetailNoticeData", JSON.stringify(this.DetailNoticeData))
          this.$router.push('/DetailNotice')
        } else {
          this.$router.push('/weblogin')
        }
      },
    }
}
</script>

<style scoped>
.box-card:hover{
  cursor:pointer ;
}
</style>
